﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NetFramework.DataAccess.EntityBuilder
{
    internal class EntityBindingInfo
    {
        public List<BindingInfo> BindingInfoList { get; set; }

        public List<ReferenceBindingInfo> ReferenceBindingInfoList { get; set; }

        public BindingInfo HitBindingInfo(string prefix, string name)
        {
            BindingInfo info = null;
            if (this.BindingInfoList != null && this.BindingInfoList.Count > 0)
            {
                info = this.BindingInfoList.Find(delegate(BindingInfo find)
                {
                    return prefix + find.Name == name;
                });
            }

            return info;
        }
    }
}
